






//
//  LeeRenWuXXCYViewController.m
//  firstpoint
//
//  Created by 李雪虎 on 2017/7/21.
//  Copyright © 2017年 xzcysoft. All rights reserved.
//

#import "LeeRenWuXXCYViewController.h"
#import "LeeFaBiaoHuodongVCViewController.h"//提交
#import <UMSocialCore/UMSocialCore.h>
@interface LeeRenWuXXCYViewController ()
{
    UIScrollView *scre;
    UILabel*titleLab;//标题
    //内容
    UILabel*infoLab;
    //金豆
    UILabel*jindouLab;
    //活动时间
    UILabel*huodongTimeLab;
    //参与人数
    UILabel*canyurenshuLab;
    UIButton *tijiaoBtn;
   //状态
    UILabel *zhuangTailabel ;
}
@property(nonatomic,strong)UIView *FenXiangBGView;
@property (nonatomic,assign)int tijiaoZhuangtai;
@end

@implementation LeeRenWuXXCYViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view.backgroundColor= LRRGBColor(230, 240, 243);
    self.title = @"任务详情";
    [self addViewScroView];
    if (_zhuangtaiInt==1||_zhuangtaiInt==7||_zhuangtaiInt==3||_zhuangtaiInt==9) {
        //通过1,已完成3,已通过7.终止9
    }else{
        [self fangqiButton];//放弃按钮
        if (_zhuangtaiInt==2||_zhuangtaiInt==8) {
            //不通过
            [self tijiaoButtonView:@"重新提交"];
        }
        if (_zhuangtaiInt==4) {
            [self tijiaoButtonView:@"提 交"];
        }
        if (_zhuangtaiInt==6) {
            //审核中
            [self tijiaoButtonView:@"重新提交"];
        }
        
      
    }
    [self setUItwo];
    [self navButton];//
    [self kefuanniuView];//客服按钮
     [self httpRuqestRenWuXiangQing];//详情
    // Do any additional setup after loading the view.
}
-(void)navButton
{
    UIButton* rightBun = [UIButton buttonWithType:UIButtonTypeCustom];
    rightBun.frame = CGRectMake(0, 0, 20, 20);
    [rightBun setBackgroundImage:[UIImage imageNamed:@"rwlc"] forState:normal];
    [rightBun addTarget:self action:@selector(fenxiangbtnClcike) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem* right = [[UIBarButtonItem alloc] initWithCustomView:rightBun];
    //    self.navigationItem.rightBarButtonItem = right;
    
    
    
    UIButton* rightBtntwo = [UIButton buttonWithType:UIButtonTypeCustom];
    rightBtntwo.frame = CGRectMake(40, 0, 20, 20);
    [rightBtntwo setBackgroundImage:[UIImage imageNamed:@"rwsc"] forState:normal];
    [rightBtntwo addTarget:self action:@selector(shouchangBtnClcike) forControlEvents:UIControlEventTouchUpInside];
    UIBarButtonItem* righttwo = [[UIBarButtonItem alloc] initWithCustomView:rightBtntwo];
    //    self.navigationItem.rightBarButtonItem = righttwo;
    
    
    self.navigationItem.rightBarButtonItems  = @[right,righttwo];
}
-(void)addViewScroView{
    scre = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, width_screen,height_screen-60)];
    scre.contentSize = CGSizeMake(width_screen, height_screen+100);
    scre.backgroundColor= LRRGBColor(230, 240, 243);
    [self.view addSubview:scre];
    
    zhuangTailabel = [[UILabel alloc]initWithFrame:CGRectMake(width_screen-100, 64, 60, 20)];
    zhuangTailabel.backgroundColor = [UIColor redColor];
    switch (_zhuangtaiInt) {
        case 1:
            zhuangTailabel.text=@"已完成"; //状态
            break;
        case 2:
            zhuangTailabel.text = @"不通过";
            break;
        case 3:
            zhuangTailabel.text = @"已完成";
            break;
        case 4:
            zhuangTailabel.text = @"未完成";
            break;
        case 5:
            zhuangTailabel.text = @"发布中";
            break;
        case 6:
            zhuangTailabel.text = @"审核中";
            break;
        case 7:
            zhuangTailabel.text = @"已完成";
            break;
        case 8:
            zhuangTailabel.text = @"未通过";
            break;
        case 9:
            zhuangTailabel.text = @"终止";
            break;
            
            
        default:
            break;
    }
    
    zhuangTailabel.textColor = [UIColor whiteColor];
    zhuangTailabel.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:zhuangTailabel];
    
    UIView*view=[[UIView alloc]initWithFrame:CGRectMake(0, 64, width_screen, 78)];
    view.backgroundColor=[UIColor whiteColor];
    [scre addSubview:view];
    UIImageView*imgView=[[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 15, 15)];
    imgView.image = [UIImage imageNamed:@"grzxwdrw"];
//    imgView.backgroundColor=[UIColor orangeColor];
    [view addSubview:imgView];
    //标题
    titleLab=[[UILabel alloc]initWithFrame:CGRectMake(30, 10, width_screen-40, 15)];
    titleLab.font=[UIFont systemFontOfSize:15];
    //    titleLab.text=@"唱片店内 传来异国民谣";
    [view addSubview:titleLab];
    //内容
    infoLab=[[UILabel alloc]initWithFrame:CGRectMake(10, 35, width_screen-20, 33)];
    infoLab.numberOfLines=0;
    //    infoLab.text=@"原来过得很快乐 只我一人未发觉 如能忘掉渴望 岁月长 衣裳薄";
    infoLab.font=[UIFont systemFontOfSize:13];
    infoLab.textColor=LRRGBColor(163, 164, 165);
    [view addSubview:infoLab];
}
-(void)setUItwo
{
    UIView*view=[[UIView alloc]initWithFrame:CGRectMake(0, 152, width_screen, height_screen-152-170)];
    view.backgroundColor=[UIColor whiteColor];
    [scre addSubview:view];
    
    UIView*fengeView=[[UIView alloc]initWithFrame:CGRectMake(10, 60, width_screen-20, 1)];
    fengeView.backgroundColor=LRRGBColor(230, 240, 243);
    [view addSubview:fengeView];
    //金豆
    jindouLab=[[UILabel alloc]initWithFrame:CGRectMake(10, 19, width_screen/2, 22)];
    jindouLab.textColor=[UIColor orangeColor];
    //    jindouLab.text=@"182 金豆";
    jindouLab.font=[UIFont systemFontOfSize:22];
    [view addSubview:jindouLab];
    //活动时间
    UIView *jinduview = [[UIView alloc]initWithFrame:CGRectMake(width_screen-120, 19, 100, 8)];
    jinduview.backgroundColor = LRRGBColor(197, 198, 199);
    [jinduview.layer setCornerRadius:3];
    jinduview.layer.masksToBounds = YES;
    [view addSubview:jinduview];
    huodongTimeLab=[[UILabel alloc]initWithFrame:CGRectMake(0, 0, 1, 8)];
    [huodongTimeLab.layer setCornerRadius:3];
    huodongTimeLab.layer.masksToBounds = YES;
    huodongTimeLab.backgroundColor=LRRGBColor(226, 23, 40);
    [jinduview addSubview:huodongTimeLab];
    //参与人数
    canyurenshuLab=[[UILabel alloc]initWithFrame:CGRectMake(width_screen-130, 34, 120, 10)];
    canyurenshuLab.font=[UIFont systemFontOfSize:10];
     canyurenshuLab.textAlignment = NSTextAlignmentRight;
    canyurenshuLab.textColor=LRRGBColor(163, 164, 165);
    
    //    canyurenshuLab.text=@"参与人数 1111";
    [view addSubview:canyurenshuLab];
    //任务详情
    UILabel *renwuxiangq = [[UILabel alloc]initWithFrame:CGRectMake(15, 75, 200, 20)];
    renwuxiangq.font=[UIFont systemFontOfSize:20];
    renwuxiangq.text = @"任务详情";
    renwuxiangq.textColor=LRRGBColor(0, 119, 190);
    [view addSubview: renwuxiangq];
    
    
    NSArray *arrti = @[@"名称:",@"时间:",@"任务目标:",@"任务人数:",@"其他:",@"工作日期:",@"工作时段:",@"性别:",@"年龄:",@"任务区域:"];
    for (int i=0; i<10; i++) {
        UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(15, 120+(20*i), 70, 20)];
        label.text = arrti[i];
        label.font = [UIFont systemFontOfSize:14];
        label.textColor = LRRGBColor(163, 164, 165);
        [view addSubview:label];
        
    }
    for (int i=0; i<10; i++) {
        UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(75, 120+(20*i), width_screen-100, 20)];
        label.font = [UIFont systemFontOfSize:14];
        label.textColor = LRRGBColor(163, 164, 165);
        label.tag = 100+i;
        [view addSubview:label];
        
    }
    
    
    
}
-(void)kefuanniuView{
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    button.frame = CGRectMake(width_screen-60, height_screen-140, 50, 50);
    //    button.backgroundColor = [UIColor redColor];
    [button setBackgroundImage:[UIImage imageNamed:@"rwkf"] forState:UIControlStateNormal];
    [self.view addSubview:button];
    
}
#pragma mark--放弃按钮
-(void)fangqiButton{
    UIButton *fqbutton = [UIButton buttonWithType:UIButtonTypeCustom];
    fqbutton.frame = CGRectMake(width_screen/2+1, height_screen-60, width_screen/2-1, 60);
    fqbutton.backgroundColor = [UIColor whiteColor];
    [fqbutton setTitleColor:LRRGBColor(0, 132, 211) forState:UIControlStateNormal];
    [fqbutton setTitle:@"放 弃" forState:UIControlStateNormal];
    fqbutton.tag = 1000000;
    [fqbutton addTarget:self action:@selector(fqbtnClicke) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:fqbutton];
    
    
}
#pragma mark--提交按钮
-(void)tijiaoButtonView:(NSString *)string{
    tijiaoBtn = [UIButton buttonWithType:UIButtonTypeCustom];
    tijiaoBtn.frame = CGRectMake(0, height_screen-60, width_screen/2-1, 60);
    tijiaoBtn.backgroundColor = [UIColor whiteColor];
    [tijiaoBtn addTarget:self action:@selector(tijiaoBtnClicke:) forControlEvents:UIControlEventTouchUpInside];
    [tijiaoBtn setTitleColor:LRRGBColor(0, 132, 211) forState:UIControlStateNormal];
//    [tijiaoBtn setTitle:string forState:UIControlStateNormal];
    [self.view addSubview:tijiaoBtn];
}
#pragma mark---按钮事件
//分享
-(void)fenxiangbtnClcike{
    
    [self leeshareBtnClick];
}
//收藏
-(void)shouchangBtnClcike{
    
}
//提交按钮事件
-(void)tijiaoBtnClicke:(UIButton *)button{
    if ([button.titleLabel.text isEqualToString:@"完成任务"]) {
        [self wangChengRenWu];
    }else{
        LeeFaBiaoHuodongVCViewController *vc = [LeeFaBiaoHuodongVCViewController new];
        vc.idString = self.idString;
        vc.finishAudit = _tijiaoZhuangtai;
        [self.navigationController pushViewController:vc animated:YES];
    }
    
}
#pragma mark--完成任务URL
//完成任务
-(void)wangChengRenWu{
    __weak typeof(self) waekSelf = self;
    NSInteger taskId = [_idString integerValue];
    NSString *url = [NSString stringWithFormat:@"%@%@",LINK_BASE_URL(@"task/allodsGold.api?access_token="),NSUD_Obj(@"token")];
    
    [HTTPURL postRequest:url parameters:@{@"taskId":@(taskId),@"userId":userid,@"finishAudit":@"2"} success:^(NSURLSessionDataTask *task, id responseObject) {
        NSLog(@"%@",responseObject);
        if ([responseObject[@"retFlag"]integerValue]==1) {
            [waekSelf promptViewmessage:responseObject[@"retInfo"] sureBlock:^{
               zhuangTailabel.text = @"已完成";
                tijiaoBtn.hidden=YES;
                tijiaoBtn.alpha=0;
                UIButton *button = [self.view viewWithTag:1000000];
                button.hidden=YES;
                button.alpha=0;
            }];
            
        }else{
            [waekSelf promptViewmessage:responseObject[@"retInfo"] sureBlock:^{
                
            }];
        }
        
        
    } filure:^(NSURLSessionDataTask *task, id error) {
        NSLog(@"%@",error);
    }];
}
#pragma mark--放弃任务URL
//放弃任务
-(void)fqbtnClicke{
     __weak typeof(self) waekSelf = self;
    NSInteger taskId = [_idString integerValue];
    NSString *url = [NSString stringWithFormat:@"%@%@",LINK_BASE_URL(@"task/abortMission.api?access_token="),NSUD_Obj(@"token")];
    
    [HTTPURL postRequest:url parameters:@{@"taskId":@(taskId),@"userId":userid} success:^(NSURLSessionDataTask *task, id responseObject) {
        NSLog(@"%@",responseObject);
        if ([responseObject[@"retFlag"]integerValue]==1) {
            [waekSelf promptViewmessage:responseObject[@"retInfo"] sureBlock:^{
                [waekSelf.navigationController popToRootViewControllerAnimated:YES];
            }];
            
        }else{
            [waekSelf promptViewmessage:responseObject[@"retInfo"] sureBlock:^{
                
            }];
        }
        
        
    } filure:^(NSURLSessionDataTask *task, id error) {
        NSLog(@"%@",error);
    }];
    
    
   
}
#pragma mark---任务详情
-(void)httpRuqestRenWuXiangQing{
    NSLog(@"%@",_idString);
    __weak typeof(self) waekSelf = self;
    NSInteger taskId = [_idString integerValue];
    NSString *url = [NSString stringWithFormat:@"%@%@",LINK_BASE_URL(@"task/chackTaskInfo.api?access_token="),NSUD_Obj(@"token")];
    [HTTPURL postRequest:url parameters:@{@"taskId":@(taskId)} success:^(NSURLSessionDataTask *task, id responseObject) {
        NSLog(@"%@",responseObject);
        if ([responseObject[@"retFlag"]integerValue]==1) {
            NSDictionary *dic = [PublicTools dictionaryWithJsonString:responseObject[@"data"]];
            _tijiaoZhuangtai = [dic[@"finishAudit"]intValue];
            if (_zhuangtaiInt==1||_zhuangtaiInt==7||_zhuangtaiInt==3||_zhuangtaiInt==9) {
                //通过1,已完成3,已通过7.终止9
            }else{
                if (_tijiaoZhuangtai==1) {
                    [tijiaoBtn setTitle:@"提交任务" forState:UIControlStateNormal];
                }else{
                    [tijiaoBtn setTitle:@"完成任务" forState:UIControlStateNormal];
                }
            }
            
            [waekSelf xiugaixianshi:dic];
        }
        
        
    } filure:^(NSURLSessionDataTask *task, id error) {
        NSLog(@"%@",error);
    }];
}
-(void)xiugaixianshi:(NSDictionary *)dic{
    titleLab.text = [NSString stringWithFormat:@"%@",dic[@"title"]];
    //内容
    infoLab.text = [NSString stringWithFormat:@"%@",dic[@"description"]];
    //金豆
    jindouLab.text = [NSString stringWithFormat:@"%@ 金豆",dic[@"everyoneAmount"]];
    //活动时间
    NSArray *arr = [dic[@"releaseTime"] componentsSeparatedByString:@" "];
    NSArray *endArr = [dic[@"endTime"] componentsSeparatedByString:@" "];//结束时间
    NSLog(@"%@",arr[0]);
    int aa = [dic[@"finCounts"]intValue];
    int as = [dic[@"peopleCount"]intValue];
    int ass = (100/as)*aa;
    huodongTimeLab.frame =CGRectMake(0,0, ass, 8);
    //参与人数
    canyurenshuLab.text = [NSString stringWithFormat:@"参与人数 %@",dic[@"counts"]];
    
    UILabel *label1 = [self.view viewWithTag:100];
    label1.text = [NSString stringWithFormat:@"%@",dic[@"title"]];//名称
    UILabel *label2 = [self.view viewWithTag:101];
    label2.text = [NSString stringWithFormat:@"活动时间 %@--%@",arr[0],endArr[0]];;//时间
    UILabel *label3 = [self.view viewWithTag:102];
    label3.text = [NSString stringWithFormat:@"%@",dic[@"description"]];//任务目标
    UILabel *label4 = [self.view viewWithTag:103];
    label4.text = [NSString stringWithFormat:@"%@",dic[@"peopleCount"]];//任务人数
    UILabel *label5 = [self.view viewWithTag:104];
//    label5.text = [NSString stringWithFormat:@"%@",dic[@""]];//其他
    UILabel *label6 = [self.view viewWithTag:105];
    label6.text = [NSString stringWithFormat:@"%@",dic[@"workingDate"]];//工作日期
    UILabel *label7 = [self.view viewWithTag:106];
    label7.text = [NSString stringWithFormat:@"%@--%@",arr[0],endArr[0]];//工作时段
    UILabel *label8 = [self.view viewWithTag:107];
    label8.text = [NSString stringWithFormat:@"%@",dic[@"sex"]];//性别
    UILabel *label9 = [self.view viewWithTag:108];
    label9.text = [NSString stringWithFormat:@"%@",dic[@"endAge"]];//年龄
    UILabel *label10 = [self.view viewWithTag:109];
    label10.text = [NSString stringWithFormat:@"%@",dic[@"areaId"]];//任务区域
    switch ([dic[@"status"]integerValue]) {
        case 1:
            zhuangTailabel.text = @"通过";
            break;
        case 2:
            zhuangTailabel.text = @"不通过";
            break;
        case 3:
            zhuangTailabel.text = @"已完成";
            break;
        case 4:
            zhuangTailabel.text = @"未完成";
            break;
        case 5:
            zhuangTailabel.text = @"发布中";
            break;
        case 6:
            zhuangTailabel.text = @"审核中";
            break;
        case 7:
            zhuangTailabel.text = @"已通过";
            break;
        case 8:
            zhuangTailabel.text = @"未通过";
            break;
        case 9:
            zhuangTailabel.text = @"终止";
            break;
        
            
        default:
            break;
    }
    
}
-(void)promptViewmessage:(NSString *)message sureBlock:(void(^)())sureBlock suerb:(void(^)())tsureBlock{
    UIAlertController * alert=[UICommonView showTwoAlertWithTitle:@"提示" message:message preferredStyle:UIAlertControllerStyleAlert sureTitle:@"取消" cancelTitle:@"去完成" sureBlock:^{
        
    } cancelBlock:^{
        
    }];
    [self presentViewController:alert animated:YES completion:nil];
}
//提示框
-(void)promptViewmessage:(NSString *)message sureBlock:(void(^)())sureBlock
{
    UIAlertController * alert= [UICommonView showOneAlertWithTitle:@"提示" message:message preferredStyle:UIAlertControllerStyleAlert sureTitle:@"确实" sureBlock:^{
        sureBlock();
    }];
    [self presentViewController:alert animated:YES completion:nil];
}
//分享
-(void)leeshareBtnClick
{
    _FenXiangBGView=[[UIView alloc]initWithFrame:self.view.bounds];
    _FenXiangBGView.backgroundColor=COLOR(0, 0, 0, 0.4);
    [self.view addSubview:_FenXiangBGView];
    
    UIView*addView=[[UIView alloc]initWithFrame:CGRectMake(0, 64, width_screen, 190)];
    addView.backgroundColor=[UIColor whiteColor];
//    addView.layer.cornerRadius=13;
    [_FenXiangBGView addSubview:addView];
    UILabel*heardLab=[[UILabel alloc]initWithFrame:CGRectMake(width_screen/2.0-18, 5, 36, 4)];
    heardLab.backgroundColor=COLOR(203, 205, 204, 0.5);
    heardLab.layer.cornerRadius=2;
    [addView addSubview:heardLab];
    //提示字
    UILabel*tishiLab=[[UILabel alloc]initWithFrame:CGRectMake(16, 17, 100, 24)];
    tishiLab.text=@"分享";
    tishiLab.font=[UIFont systemFontOfSize:16];
    tishiLab.textColor=COLOR(188, 188, 188, 0.5);
    [addView addSubview:tishiLab];
    //关闭按钮
    UIButton*exitBtn=[UIButton buttonWithType:UIButtonTypeCustom];
    exitBtn.frame=CGRectMake(width_screen-35, 17, 20, 20);
    [exitBtn setImage:[UIImage imageNamed:@"spxqc"] forState:UIControlStateNormal];
    [exitBtn addTarget:self action:@selector(exitBtnClick) forControlEvents:UIControlEventTouchUpInside];
    [ addView addSubview:exitBtn];
    //分割线
    UILabel*fengexianLab=[[UILabel alloc]initWithFrame:CGRectMake(15, 55, width_screen-30, 1)];
    fengexianLab.backgroundColor=COLOR(188, 188, 188, 0.5);
    [addView addSubview:fengexianLab];
    
    
    NSArray*btnImageArr=@[@"xxgrzxqq",@"xxgrzxtx",@"shdbdwx",@"xxtrzxwb"];
    NSArray*titleArr=@[@"QQ好友",@"QQ空间",@"微信",@"新浪微博"];
    for (int i=0; i<4; i++) {
        UIImageView*imgView = [[UIImageView alloc]initWithFrame:CGRectMake(35+(width_screen-70-130)/2*i, 70, 45, 45)];
        imgView.image = [UIImage imageNamed:btnImageArr[i]];
        [addView addSubview:imgView];
        UILabel*lab = [[UILabel alloc]initWithFrame:CGRectMake(35+(width_screen-70-130)/2*i, 105, 45, 45)];
        lab.text = titleArr[i];
        lab.font = [UIFont systemFontOfSize:12];
        lab.textAlignment = NSTextAlignmentCenter;
        [addView addSubview:lab];
        UIButton*shaerBtn=[UIButton buttonWithType:UIButtonTypeCustom];
        shaerBtn.frame=CGRectMake(35+(width_screen-70-130)/2*i, 60, 45, 60);
        //        [shaerBtn setImage:btnImageArr[i] forState:UIControlStateNormal];
        //        [shaerBtn setTitle:titleArr[i] forState:UIControlStateNormal];
        [shaerBtn setTitleColor:COLOR(140,140 , 140, 1) forState:UIControlStateNormal];
        if (i==1) {
            [shaerBtn setTitleEdgeInsets:UIEdgeInsetsMake(50, -28, 0, 0)];
        }else{
            [shaerBtn setTitleEdgeInsets:UIEdgeInsetsMake(50, -38, 0, 0)];
        }
        shaerBtn.tag=i+1;
        [shaerBtn addTarget:self action:@selector(shaerBtnCilck:) forControlEvents:UIControlEventTouchUpInside];
        shaerBtn.titleLabel.font=[UIFont systemFontOfSize:12];
        [addView addSubview:shaerBtn];
    }
}
//关闭弹出视图
-(void)exitBtnClick
{
    [_FenXiangBGView removeFromSuperview];
}
-(void)shaerBtnCilck:(UIButton*)button
{
    if (button.tag==1) {
        [self shareWebPageToPlatformType:4];
        
    }
    if (button.tag==2) {
        [self shareWebPageToPlatformType:5];
        
    }
    if (button.tag==3) {
        [self shareWebPageToPlatformType:2];
        
    }
    if (button.tag==4) {
        [self shareWebPageToPlatformType:0];
        
    }
}
//分享
- (void)shareWebPageToPlatformType:(UMSocialPlatformType)platformType
{
    
    
    //创建分享消息对象
    UMSocialMessageObject *messageObject = [UMSocialMessageObject messageObject];
    
    //创建网页内容对象
    NSString* thumbURL =  @"https://mobile.umeng.com/images/pic/home/social/img-1.png";
    UMShareWebpageObject *shareObject = [UMShareWebpageObject shareObjectWithTitle:@"欢迎使用【友盟+】社会化组件U-Share" descr:@"欢迎使用【友盟+】社会化组件U-Share，SDK包最小，集成成本最低，助力您的产品开发、运营与推广！" thumImage:thumbURL];
    //设置网页地址
    shareObject.webpageUrl = @"http://mobile.umeng.com/social";
    
    //分享消息对象设置分享内容对象
    messageObject.shareObject = shareObject;
    
    //调用分享接口
    [[UMSocialManager defaultManager] shareToPlatform:platformType messageObject:messageObject currentViewController:self completion:^(id data, NSError *error) {
        if (error) {
            UMSocialLogInfo(@"************Share fail with error %@*********",error);
        }else{
            if ([data isKindOfClass:[UMSocialShareResponse class]]) {
                UMSocialShareResponse *resp = data;
                //分享结果消息
                UMSocialLogInfo(@"response message is %@",resp.message);
                //第三方原始返回的数据
                UMSocialLogInfo(@"response originalResponse data is %@",resp.originalResponse);
                
            }else{
                UMSocialLogInfo(@"response data is %@",data);
            }
        }
        //        [self alertWithError:error];
    }];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
 #pragma mark - Navigation
 
 // In a storyboard-based application, you will often want to do a little preparation before navigation
 - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
 // Get the new view controller using [segue destinationViewController].
 // Pass the selected object to the new view controller.
 }
 */

@end
